package com.nbsaas.boot.room.data.entity;

import com.nbsaas.boot.code.annotation.FieldConvert;
import com.nbsaas.boot.code.annotation.FieldName;
import com.nbsaas.boot.code.annotation.FormAnnotation;
import com.nbsaas.boot.jpa.data.entity.LongEntity;
import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.*;
import java.math.BigDecimal;

@Data
@FormAnnotation(title = "房间")
@Entity
@Table(name = "bs_shop_room")
public class RoomPrice extends LongEntity {

    @FieldName
    @FieldConvert
    @ManyToOne(fetch = FetchType.LAZY)
    private Room room;

    @Column(length = 16)
    @Comment("日期 2024-01-28")
    private String dayKey;

    @Comment("当日价格")
    private BigDecimal price;

}
